<!DOCTYPE html>
<html class="x-admin-sm">
<!-- 导购员查看订单信息（废弃）  -->
<head>
    <meta charset="UTF-8">
    <title>保购订单查看页面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"
    />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
	<link rel="stylesheet" href="./css/jquery.step.css">
	<link href="css/newStyle.css" rel="stylesheet">
    <!-- 弹窗轻提示 -->
    <link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <script src="js/plugins/sweetalert/sweetalert.min.js"></script>
	  <!-- 引入jq -->
	  <script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
    <script src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
	<script type="text/javascript" src="./js/jquery.min.js"></script>
	<script type="text/javascript" src="./js/jquery.step.min.js"></script>
	<script type="text/javascript" src="./js/common.js"></script>
	<!-- <script type="text/javascript" src="./js/domain.js"></script> -->
    <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    <style>
		 .none {
            display: none;
        }
        .fl {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        /* 筛选模块 */

        .searchPart {
            border: 1px solid #ccc;
            margin: 15px 15px 5px 15px;
            background-color: #fff;
        }

        .layui-form-item {
            margin-bottom: 3px;
        }

        /* 表格部分 */

        .FormTablePart,
        .TotalTablePart,
        .FanTablePart {
            margin: 15px 15px;
        }

        .FormTablePart {
            border: 1px solid #ddd;
            height: 23vh;
            text-align: center;
        }

        .userImg .layui-icon {
            font-size: 70px;
            color: #ccc;
        }

        .userNum {
            font-size: 16px;
            margin: 15px 0;
        }

        .userText {
            width: 100px;
            height: 25px;
            line-height: 25px;
            background: #f04844;
            border-radius: 10px;
            margin: 0 auto;
            color: #fff;
        }

        .FormTablePartLf {
            padding-top: 20px;
            flex: 3;
        }

        .FormTablePartRg {
            flex: 7;
            height: 100%;
            margin-top: 20px;
        }

        .layui-table-view .layui-table {
            width: 100%;
            height: 100%;
        }


        .totalTitle,
        .fanTitle {
            font-size: 16px;
            color: #666;
        }
		
		.main {
			width: 1000px;
			margin: 50px auto;
		}
		
		#step {
			margin-bottom: 60px;
		}
		.ui-step-item-num{line-height: 26px;}
		.btns {
			float: left;
		}
		
		.info {
			float: left;
			height: 34px;
			line-height: 34px;
			margin-left: 40px;
			font-size: 28px;
			font-weight: bold;
			color: #928787;
		}
		
		.info span {
			color: red;
		}
		.headBg{height: 70px;margin-bottom:15px;border: solid 1px #ddd;overflow: hidden;}
		.headText{float: left;margin-left: 10px;color: red;font-size: 18px;line-height: 70px;}
		.headBtn{height: 30px;padding: 0 10px;font-size: 16px;float: right;margin: 20px 15px 20px 0;background: none;border: solid 1px #ddd;cursor:pointer;line-height: 30px;}
    </style>
</head>

<body>
    <!-- 统计信息模块 -->
    <div class="TotalTablePart">
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		  <legend>订单详情</legend>
		</fieldset>
		<div class="main">
			<div id="step"></div>
			<!-- <div class="btns">
				<button id="prevBtn">上一步</button>
				<button id="nextBtn">下一步</button>
				<button id="btn1">跳到第二步</button>
				<button id="btn2">跳到第三步</button>
			</div>
			<div class="info">index：<span id="index"></span></div> -->
		</div>
		
		<div class="headBg">

			<div class="headText">当前订单状态：待付款</div>
			<button class="headBtn" onclick="xadmin.open('备注订单','guideList_remark.html',600,400)">备注订单</button>
			<button class="headBtn" onclick="xadmin.open('备注订单','guideList_close.html',600,400)">关闭订单</button>
			<button class="headBtn" onclick="xadmin.open('发站内信','guideList_info.html',600,400)">发送站内信</button>
			<button class="headBtn">修改费用信息</button>
			<button class="headBtn">修改商品信息</button>
			<button class="headBtn">修改收货人信息</button>
			<button class="headBtn">修改发票信息</button>
		</div>
		
        <div class="totalTitle">
            <i class="layui-icon layui-icon-rate-solid"></i>
            统计信息
        </div>
        <table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
            <thead>
                <tr>
                    <th>订单编号</th>
                    <th>发货单流水号</th>
                    <th>用户账号</th>
                    <th>支付方式</th>
                    <th>订单来源</th>
                    <th>订单类型</th>
                </tr>
            </thead>
			<tbody>
				<tr>
				    <td id="orderSerialNumber"></td>
				    <td>1</td>
				    <td id="wpMemberInfoId"></td>
				    <td id="payType"></td>
				    <td id="orderSource"></td>
				    <td>普通订单</td>
				</tr>
			</tbody>
        </table>
		<table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
		    <thead>
		        <tr>
		            <th>配送方式</th>
		            <th>物流单号</th>
		            <th>自动确认收货时间</th>
		            <th>订单可得保盾</th>
		            <th>订单可得成长值</th>
		            <th>活动信息</th>
		        </tr>
				<tbody>
					<tr>
					    <td id="orderDelivery"></td>
					    <td id="expressNumber"></td>
					    <td>15天</td>
					    <td id="goodsGiveBao"></td>
					    <td id="goodsGrowthValue"></td>
					    <td id="activityInformation"></td>
					</tr>
				</tbody>
		    </thead>
		</table>
		<div class="totalTitle">
		    <i class="layui-icon layui-icon-rate-solid"></i>
		     发票信息
		</div>
		<table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
		    <thead>
		        <tr>
		            <th>发票类型</th>
		            <th>发票抬头</th>
		            <th>发票内容</th>
		            <th>收票人信息</th>
		        </tr>
		    </thead>
			<tbody>
				<tr>
				    <td>1</td>
				    <td>1</td>
				    <td>1</td>
				    <td>1</td>
				</tr>
			</tbody>
		</table>
		<div class="totalTitle">
		    <i class="layui-icon layui-icon-rate-solid"></i>
		     收货人信息
		</div>
		<table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
		    <thead>
		        <tr>
		            <th>收货人</th>
		            <th>手机号码</th>
		            <th>邮政编码</th>
		            <th>收货地址</th>
		        </tr>
		    </thead>
			<tbody>
				<tr>
				    <td id="linkMan"></td>
				    <td id="connectPhone"></td>
				    <td id="zipCode"></td>
				    <td id="address"></td>
				</tr>
			</tbody>
		</table>
		<div class="totalTitle">
		    <i class="layui-icon layui-icon-rate-solid"></i>
		     商品信息
		</div>
		<table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
		    <thead>
		        <tr>
		            <th>商品图片</th>
		            <th>商品名称</th>
		            <th>价格/货号</th>
		            <th>属性</th>
					<th>数量</th>
					<th>库存</th>
					<th>小计</th>
		        </tr>
		    </thead>
			<tbody>
				<tr>
				    <td>1</td>
				    <td>1</td>
				    <td>1</td>
				    <td>1</td>
					<td>1</td>
					<td>1</td>
					<td>1</td>
				</tr>
			</tbody>
		</table>
		<div class="totalTitle">
		    <i class="layui-icon layui-icon-rate-solid"></i>
		     费用信息
		</div>
		<table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
		    <thead>
		        <tr>
		            <th>商品合计</th>
		            <th>运费</th>
		            <th>优惠券</th>
		            <th>保盾抵扣</th>
		        </tr>
		    </thead>
			<tbody>
				<tr>
				    <td>1</td>
				    <td id="freightPrice"></td>
				    <td id="couponPrice"></td>
				    <td id="giveBaoPrice"></td>
				</tr>
			</tbody>
		</table>
		<table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
		    <thead>
		        <tr>
		            <th>活动优惠</th>
		            <th>折扣金额</th>
		            <th>订单总金额</th>
		            <th>应付款金额</th>
		        </tr>
		    </thead>
			<tbody>
				<tr>
				    <td id="activityDiscount"></td>
				    <td id="discountPrice"></td>
				    <td>1</td>
				    <td>1</td>
				</tr>
			</tbody>
		</table>
		<div class="totalTitle">
		    <i class="layui-icon layui-icon-rate-solid"></i>
		     操作信息
		</div>
		<table class="layui-table" cellMinWidth="80" lay-filter="demoEvent">
		    <thead>
		        <tr>
		            <th>操作者</th>
		            <th>操作时间</th>
		            <th>订单状态</th>
		            <th>付款状态</th>
					<th>发货状态</th>
					<th>备注</th>
		        </tr>
		    </thead>
		</table>
    </div>

</body>

 <script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container fl">
        <div class="toolbarDemoLf">
            <button class="layui-btn-danger layui-btn layui-btn-xs" lay-event="del">
                <i class="layui-icon">&#xe640;</i>批量删除</button>
            <button class="layui-btn" onclick="xadmin.open('添加用户','./member-add.html',600,400)">
                <i class="layui-icon"></i>添加</button>
            <button class="layui-btn layui-btn-sm" lay-event="getCheckData"> 获取选中行数据 </button>
            <button class="layui-btn layui-btn-sm" lay-event="getCheckLength">获取选中数目</button>
            <button class="layui-btn layui-btn-sm" lay-event="isAll"> 验证是否全选</button>
        </div>
        <div class="toolbarDemoRg">
            
        </div>
    </div>

    

    <!-- 操作按钮 -->
    <script type="text/html" id="btnS">
        <a title="查看订单" onclick="xadmin.open('查看订单','ProductListEdit.html',600,400)" href="javascript:;">
            查看订单
            <!-- <i class="layui-icon">&#xe642;</i> -->
        </a>
    </script>
    <script type="text/html" id="imgS">
        <img src="images/bg.png" width="60px" height="60px" class="layui-upload-img" onclick="previewImg(this)">
    </script>
    
    <script>
        layui.use(['table','form', 'laydate', 'layer'],
            function() {
                $ = layui.jquery;
                var form = layui.form,
                layer = layui.layer,
				table = layui.table,
        		laydate = layui.laydate;
				
				var id="";
				
				function getUrlParam(name) {
				     var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
				     var r = window.location.search.substr(1).match(reg);  //匹配目标参数
				     if (r != null) return unescape(r[2]); return null; //返回参数值
				 }
				console.log(getUrlParam("id"));
				id=getUrlParam("id");
				
				// $.ajax({
				// 	url:domain+"order/"+id,
				// 	data:{
						
				// 	},
				// 	type:"get",
				// 	dataType:"json",
				// 	contentType: "application/json;charset=UTF-8",
				// 	success:function(data){
				// 		console.log(data);
				// 		if(data.code==0){
				// 			$("#orderSerialNumber").html(data.root.orderSerialNumber);
				// 			$("#payType").html(data.root.payType==1?"支付宝":(data.root.payType==2?"微信":"未付款"))
				// 			$("#wpMemberInfoId").html(data.root.wpMemberInfoId);
				// 			$("#orderSource").html(data.root.orderSource==1?"APP购买":"其他");
				// 			$("#orderDelivery").html(data.root.orderDelivery);
				// 			$("#expressNumber").html(data.root.expressNumber);
				// 			$("#goodsGiveBao").html(data.root.goodsGiveBao);
				// 			$("#goodsGrowthValue").html(data.root.goodsGrowthValue);
				// 			$("#activityInformation").html(data.root.activityInformation);
				// 			$("#linkMan").html(data.root.linkMan);
				// 			$("#connectPhone").html(data.root.connectPhone);
				// 			$("#zipCode").html(data.root.zipCode);
				// 			$("#address").html(data.root.address);
				// 			$("#freightPrice").html(data.root.freightPrice);
				// 			$("#couponPrice").html(data.root.couponPrice);
				// 			$("#giveBaoPrice").html(data.root.giveBaoPrice);
				// 			$("#activityDiscount").html(data.root.activityDiscount);
				// 			$("#discountPrice").html(data.root.discountPrice);
				// 		}
				// 	},
				// 	error:function(data){
						
				// 	}
				// });
				
                //监听单元格编辑
                table.on('edit(test)',
                    function (obj) {
                        var value = obj.value //得到修改后的值
                            ,
                            data = obj.data //得到所在行所有键值
                            ,
                            field = obj.field; //得到字段
                        layer.msg('[ID: ' + data.id + '] ' + field + ' 字段更改为：' + value);
                    });

                //头工具栏事件
                table.on('toolbar(test)',
                    function (obj) {
                        var checkStatus = table.checkStatus(obj.config.id);

                        switch (obj.event) {
                            case 'getCheckData':
                                var data = checkStatus.data;
                                layer.alert(JSON.stringify(data));

                                break;
                            case 'getCheckLength':
                                var data = checkStatus.data;
                                layer.msg('选中了：' + data.length + ' 个');
                                break;
                            case 'isAll':
                                layer.msg(checkStatus.isAll ? '全选' : '未全选');
                                break;
                            case 'del':
                                var data = checkStatus.data;
                                layer.msg('删除了：' + data.length + ' 个');
                                var ids = "";
                                for (var i = 0; i < checkStatus.data.length; i++) {
                                    ids += checkStatus.data[i].id + ",";
                                }
                                var reg = /,$/gi;
                                str = str.replace(reg, "");
                                console.log(ids);

                                break;
                        };
                    });

                //监听行单击事件
                table.on('row(test)', function (obj) {
                    console.log(obj.tr) //得到当前行元素对象
                    console.log(obj.data) //得到当前行数据
                    //obj.del(); //删除当前行
                    //obj.update(fields) //修改当前行数据
                });



            });
    </script>

    <script>
        /*用户-删除*/
        function member_del(obj, id) {
            layer.confirm('确认要删除吗？', function (index) {
                //发异步删除数据
                $(obj).parents("tr").remove();
                layer.msg('已删除!', {
                    icon: 1,
                    time: 1000
                });
            });
        }

        function previewImg(obj) {
            var img = new Image();
            img.src = obj.src;
            //var height = img.height + 50; // 原图片大小
            //var width = img.width; //原图片大小
            var imgHtml = "<img src='" + obj.src + "' width='500px' height='500px'/>";
            //弹出层
            layer.open({
                type: 1,
                shade: 0.8,
                offset: 'auto',
                area: [500 + 'px', 550 + 'px'], // area: [width + 'px',height+'px']  //原图显示
                shadeClose: true,
                scrollbar: false,
                title: "图片预览", //不显示标题  
                content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响  
                cancel: function () {
                    //layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', { time: 5000, icon: 6 });  
                }
            });
        }
    </script>
</script>

    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>

<script type="text/html" id="shenHeStatus">
    {{#  if(d.sex === '女'){ }}
    <span style="color: green;">待付款</span>
    {{#  } else { }}
    <span style="color: red;">未付款</span>
    {{#  } }}
</script>
<script type="text/javascript">
	var $step = $("#step");
	var $index = $("#index");
	
	$step.step({
		index: 0,
		time: 500,
		title: ["提交订单", "支付订单", "平台发货", "确认收货", "完成评价"]
	});
	
	// $index.text($step.getIndex());
	
	// $("#prevBtn").on("click", function() {
	// 	$step.prevStep();
	// 	$index.text($step.getIndex());
	// });
	
	// $("#nextBtn").on("click", function() {
	// 	$step.nextStep();
	// 	$index.text($step.getIndex());
	// });
	
	// $("#btn1").on("click", function() {
	// 	$step.toStep(1);
	// 	$index.text($step.getIndex());
	// });
	
	// $("#btn2").on("click", function() {
	// 	$step.toStep(2);
	// 	$index.text($step.getIndex());
	// });
	$step.toStep(1);
</script>
</html>